#pragma once

#ifndef _EnemyController_h_
#define _EnemyController_h_

#include "Bullet.h"
#include "Enemy.h"
#include "Missile.h"
#include "Player.h"
#include "Terrain/Terrain.h"

#include <list>

namespace MyGame {

using namespace std;

class EnemyController :
            public DrawableGameComponent {
public:
    EnemyController(Game* game);
    virtual ~EnemyController(void);
    list<Bullet*>* GetBullets() const;
    list<Enemy*>* GetEnemies() const;
    list<Missile*>* GetMissiles() const;
    Player* GetPlayer() const;
    void SetPlayer(Player* val);
    Terrain* GetTerrain() const;
    void SetTerrain(Terrain* val);
    virtual void Draw(FLOAT timeDelta);
    virtual void Initialize();
    virtual void LoadContent();
    virtual void UnloadContent();
    virtual void Update(FLOAT timeDelta);
private:
    list<Bullet*>* bullets;
    list<Enemy*>* enemies;
    list<Missile*>* missiles;
    Player* player;
    float spawnTimer;
    Terrain* terrain;
    void UpdateBullets(FLOAT timeDelta);
    void UpdateEnemies(FLOAT timeDelta);
    void UpdateMissiles(FLOAT timeDelta);
};

}

#endif
